<!DOCTYPE html>
<!-- ng-app -->
<html lang="en" ng-app>
<head>
    <meta charset="UTF-8">
    <title></title>
    <script src="../../../js/plugins/angular/angular.min.js" type="text/javascript"></script>
</head>
<body>
    <div ng-controller="c2_2">
        <input type="text" ng-model="text">
        <button ng-click="show()">显示</button>
    </div>

    <script>
        function c2_2($window,$scope) {
            $scope.text = "";
            $scope.show = function () {
                $window.alert("您输入的内容是：" + $scope.text);
            }
        }

    </script>
</body>
</html>